]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell: Replace another GTimeVal
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 10 Sep 2019 02:40:15 +0000 (04:40 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 10 Sep 2019 17:51:02 +0000 (17:51 +0000)
This slipped through in commit 9b7f228f8ef.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/709

src/shell-util.c

index d38c5ab98e50e9ea7f385db9f5032c66eec13354..3f57ada8d5883aaf3fd1368ac1e37c77f19cc41e 100644 (file)
@@ -144,13 +144,9 @@ shell_util_format_date (const char *format,
                         gint64      time_ms)
 {
   GDateTime *datetime;
-  GTimeVal tv;
   char *result;
 
-  tv.tv_sec = time_ms / 1000;
-  tv.tv_usec = (time_ms % 1000) * 1000;
-
-  datetime = g_date_time_new_from_timeval_local (&tv);
+  datetime = g_date_time_new_from_unix_local (time_ms / 1000);
   if (!datetime) /* time_ms is out of range of GDateTime */
     return g_strdup ("");